<?php

require_once("show_number.php");

// This function will print HTML to display a problem with the 
// given numbers and operation. The problem is displayed with
// $num1 on top with the $operator and $num2 on bottom with a
// horizontal line underneath.
function show_problem($num1, $operator, $num2)
{
	print get_problem_html($num1, $operator, $num2);
}

function get_problem_html($num1, $operator, $num2)
{
	global $height;
	global $numdir;

	$ret_str  = "<table>\n";
	$ret_str .= "	<tr><td align=\"right\">".get_number_html($num1)."</td></tr>\n";
	$ret_str .= "	<tr><td><img height='$height' src='$numdir/${operator}.png'>".get_number_html($num2)."</td></tr>\n";
	$ret_str .= "	<tr><td height=\"".floor($height/12)."\" bgcolor=\"black\"></td></tr>\n";
	$ret_str .= "	</table>\n";

	return $ret_str;
}


?>